package com.taosdata.example.springbootdemo.controller;

import com.taosdata.example.springbootdemo.domain.Weather;
import com.taosdata.example.springbootdemo.service.IMysqlService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author BUG WRITTER
 * @date 2021/12/13 9:48
 */
@RequestMapping("/mysql")
@RestController
public class MysqlController {
    @Autowired
    IMysqlService mysqlService;

    @GetMapping("/getOne")
    public Weather getOne() {
        return mysqlService.findOne();
    }
}
